package stream;

import dto.User;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) {
        User u1 = new User(1L, "a", "21");
        User u2 = new User(2L, "b", "21");
        User u3 = new User(3L, "c", "21");
        User u4 = new User(4L, "d", "21");
        User u5 = new User(5L, "e", "21");
        List<User> users = Arrays.asList(u1,u2,u3,u4,u5);
        
        users.stream()
                .filter(user -> user.getId() % 2 == 0)
                .map(user -> user.getName().toUpperCase())
                .sorted((o1, o2) -> o2.compareTo(o1))
                .limit(1)
                .forEach(System.out::println);

        float b = 5 / 2F;
        float a = b / 2;
        System.out.println(b);
    }
    
    
    
}
